-
Notifications
You must be signed in to change notification settings - Fork 409
Conversation
Courtesy of GitHub Desktop :)
Co-Authored-By: Katrina Uychaco <[email protected]>
Todo: figure out a good number
Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
…tion Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
(to fix tests) Co-Authored-By: Tilde Ann Thurium <[email protected]>
Co-Authored-By: Tilde Ann Thurium <[email protected]>
simurai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the list get populated when searching for someone? Would it be possible to show username Real Name instead of Real Name [email protected]? Like GitHub Desktop.
Then it might also be possible to only show a person one time. Otherwise it's hard to decide which one to pick:
|
@simurai great question! This PR just pulled author information from Git itself - from the local repository. In another PR we'll grab info from the graphql API and allow people to search via username. We decided on this approach first because we want to cover the base case where the user has a repo but doesn't necessarily have a github remote. |
smashwilson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice ✨ No blocking changes that I see. Merge whenever you're ready 😄
keymaps/git.cson
Outdated
| '.github-Dialog input': | ||
| 'enter': 'core:confirm' | ||
|
|
||
| 'body .github-CommitView-coAuthorEditor': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is body needed here for selector specificity reasons?
| mentionableUsers: PropTypes.arrayOf(PropTypes.shape({ | ||
| email: PropTypes.string.isRequired, | ||
| name: PropTypes.string.isRequired, | ||
| })).isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for PropTypes.shape(). I know we've been a bit sloppy with our PropTypes sometimes 😄 Although it'll be a moot point if we do go to TypeScript 🤔
| // There's probably a better way. I tried finding a regex to do it in one fell swoop but had no luck | ||
| const coAuthors = body.split(LINE_ENDING_REGEX).reduce((emails, line) => { | ||
| const match = line.match(/\s*Co-authored-by: .*<(.*)>\s*/); | ||
| const match = line.match(/^co-authored-by: .*<(.*)>\s*/i); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call 👍
| return []; | ||
| } else { | ||
| throw err; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
| for (const trailer of trailers) { | ||
| args.push('--trailer', `${trailer.token}=${trailer.value}`); | ||
| } | ||
| return this.exec(args, {stdin: commitMessage}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh! TIL 🌠
| if (!fakeEvent.defaultPrevented) { | ||
| e.abortKeyBinding(); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh, wacky 😄
| 'github:co-author:pagedown': this.proxyKeyCode(34), | ||
| 'github:co-author:end': this.proxyKeyCode(35), | ||
| 'github:co-author:home': this.proxyKeyCode(36), | ||
| 'github:co-author:delete': this.proxyKeyCode(46), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Random sidenote: we could move these into a <Commands> view for extra React Points.
| "diff": "3.2.0", | ||
| "dompurify": "^1.0.3", | ||
| "dugite": "1.49.0", | ||
| "dugite": "^1.60.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good call.
package.json
Outdated
| "FilePatchControllerStub": "createFilePatchControllerStub" | ||
| } | ||
| }, | ||
| "false": {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, what's this for?
|
|
||
| await git.exec(['config', 'user.name', 'Com Mitter']); | ||
| await git.exec(['config', 'user.email', '[email protected]']); | ||
| await git.exec(['commit', '--allow-empty', '--author="A U Thor <[email protected]>"', '-m', 'Commit together!']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤣
|
Huh. What's up with the failing tests, though? They look unrelated... ? |
|
For the sake of getting this feature out so that others can dog-food and provide input we're going to merge this as-is and implement all remaining to-dos in future PRs. |

TODO:
getAuthorsIn separate PRs:
%x1Fdelimiter forgetRecentCommits/cc @niik @simurai